package org.ourgrid.aspectos;

import org.ourgrid.gridMonitor.GridMonitorSpy;
import org.ourgrid.gridMonitor.TipoMonitorado;
import org.ourgrid.gridMonitor.operations.WorkerLocalOperation;

public aspect Worker {
	pointcut startWorker() : call(* waitForWorker*(..));
	before() : startWorker() {
		System.out.println("StartWorkerAction.actionPerformed");
		System.out.println("Implementacao do aspecto");
		GridMonitorSpy gms = new GridMonitorSpy(TipoMonitorado.WORKER, 9000);
		gms.start();
	}
	after() :startWorker() {
		WorkerLocalOperation.saveWorkerInformation();	}
}
